package tothreedesignmodel.builder;

/**
 * @Author lzhphantom
 * @Description
 * @Date 创建于 17:49 2020/7/20
 * @Modified
 */
public class Director {
    private Builder builder;

    public Director(Builder builder) {
        this.builder = builder;
    }
    public Computer construct(){
        builder.buildCPU();
        builder.buildDisPlayer();
        builder.buildMainBoard();
        return builder.createComputer();
    }

    public static void main(String[] args) {
        Director director = new Director(new XiaoMiBuilder());
        System.out.println(director.construct());
    }
}
